import * as mongoose from 'mongoose';
import db2 from '../lib/db/mongodb2';
////备份数据
let excelExportSchema2: mongoose.Schema = new mongoose.Schema({
    userId:String,
    userName:String,
    date_:String,
    visitCount_plan:Number,//计划拜访客户数量(一天)
    actuall_visitCount:Number,//实际拜访数量
    consumerRate:String, //客户拜访达成率(一天)
    newConsumerRate:String, //新客户拜访达成率
    newConsumerCount_plan:Number,//计划拜访新客户数量
    newConsumerCount_visit:Number,//实际拜访新客户数量
    checkInRate:String,//签到率
    actuall_checkIn:Number,//实际签到天数
    checkInTime:String,//签到时间
    // travelFrequency:String,//出差频率
    unBase_check:Number,//非工作地签到天数
    reachStandardRate:String,//已拜访门店达标率
    reachStandardStoreCount:Number,//门店达标的数量
    visitedStoreCount:Number,//已经拜访的门店数量
    storeSchadule:String,//门店拜访进度
    totalCountStore:Number,//员工名下总的门店数量
    year: String,
    month: String,
    comment:Number

}, { collection: 'excelExport'});
export interface Excel2 extends mongoose.Document {
    userId: string;
    userName: string;
    date_: string;
    visitCount_plan: number;
    actuall_visitCount: number;
    consumerRate: string;
    newConsumerRate:string;
    newConsumerCount_plan:number;//计划拜访新客户数量
    newConsumerCount_visit:number;//实际拜访新客户数量
    actuall_checkIn: number;//实际签到天数
    checkInRate: string;
    checkInTime: string;
    unBase_check:number;//非工作地签到天数
    reachStandardRate:string;//已拜访门店达标率
    reachStandardStoreCount:number;//门店达标的数量
    visitedStoreCount:number;//已经拜访的门店数量
    storeSchadule:string;//门店拜访进度
    totalCountStore:number;//员工名下总的门店数量
    year: string;
    month: string;
    comment: number
}
let excelExportModel2 = db2.model<Excel2>('excelExport', excelExportSchema2);
// let excelExportModel2 = db2.model('excelExport2', excelExportSchema2);
export default excelExportModel2;